/**
 * ----------------------------------------------------------------------------
 * Copyright Jens Konopka
 * 
 * Alle Rechte vorbehalten.
 * Licence: Apache 2.0
 * ----------------------------------------------------------------------------
 *
 * created on 04.03.2012 by jkonopka
 */
package de.sql.toolkit.util;

import java.io.File;

/**
 * Util class with static util methods by filenames.<br>
 * 
 * @author jkonopka
 * 
 */
public final class FilenameUtil {

	/**
	 * hide constructor for public instance by this util class.<br>
	 */
	private FilenameUtil() {
	}

	/**
	 * Concat two paths to one path.<br>
	 * <br>
	 * 
	 * @param part1 Path part one
	 * @param part2 path part two
	 * @return path1 + (separator) + path2
	 */
	public static String concat(final String part1, final String part2) {
		final StringBuilder sb = new StringBuilder();
		sb.append(part1);
		if (!part1.endsWith(File.separator)) {
			sb.append(File.separator);
		}
		sb.append(part2);
		return sb.toString();
	}

}
